<template>
  <div class="container">
    <Mall title="美景">
      <img
        slot="center"
        src="https://dd59176.cdn.bcebos.com/uploads/images/pageimg/20230523/1-2305231333323.png"
        alt=""
      />
      <a slot="footer" href="http://www.baidu.com">点击查看更多美景</a>
    </Mall>
    <Mall title="书籍">
      <ul slot="center">
        <li v-for="(b, index) in books" :key="index">{{ b }}</li>
      </ul>
      <div class="bottom" slot="footer">
        <ul>
          <li v-for="(t, index) in otherBooks" :key="index">{{ t }}</li>
        </ul>
      </div>
    </Mall>
    <Mall title="电影">
      <video
        slot="center"
        controls
        src="https://fanyiapp.cdn.bcebos.com/app/video/yangliang/E77_focus.mp4"
      ></video>
      <!-- v-slot 的方式只适用于 template -->
      <template v-slot:footer>
        <div class="bottom">
          <a href="http://www.baidu.com">欧美</a>
          <a href="http://www.baidu.com">香港</a>
          <a href="http://www.baidu.com">大陆</a>
        </div>
        <h4>观影地址：万达影城</h4>
      </template>
    </Mall>
  </div>
</template>

<script>
import Mall from "./components/Mall";
export default {
  name: "App",
  components: { Mall },
  data() {
    return {
      books: ["《一千零一夜》", "《老人与海》", "《安徒生童话集》"],
      otherBooks: [
        "《Vue从入门到精通》",
        "《SpringBoot从入门到精通》",
        "《MySQL从入门到精通》",
      ],
    };
  },
};
</script>

<style scoped>
.container,
.bottom {
  display: flex;
  justify-content: space-around;
}
h4 {
  text-align: center;
}
</style>